<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" th:href="@{/resources/style.css}"></link>
<title>用户注册</title>
</head>
<body>
	<div id="header" th:include="page :: header"></div>
	<div id="content">
		<h1>注册</h1>
		<form action="POST" th:object="${spitter}">
			<div class="errors" th:if="${#fields.hasErrors('*')}">
				<ul>
					<li th:each="err :${#fields.errors('*')}" th:text="${err}">错误信息不存在</li>
				</ul>
			</div>
			<label th:class="${#fields.hasErrors('name')}?'error'">姓名</label>
			<input type="text" th:field="*{name}"
				th:class="${#fields.hasErrors('name')}?'error'">

			<label th:class="${#fields.hasErrors('nickname')}?'error'">昵称</label>
			<input type="text" th:field="*{nickname}"
				th:class="${#fields.hasErrors('nickname')}?'error'">

			<label th:class="${#fields.hasErrors('password')}?'error'">密码</label>
			<input type="text" th:field="*{password}"
				th:class="${#fields.hasErrors('password')}?'error'">

			<input type="submit" value="注册" />
		</form>

	</div>
	<div id="footer" th:include="page :: copy"></div>
</body>
</html>